<!DOCTYPE html>  
<html>

<head>
<link rel="stylesheet" type="text/css" href="css/mainpage.css" />
<link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>

<body>
<?php

$host="localhost"; 
$username="root"; 
$password=""; 
mysql_connect("$host", "$username", "$password")or die("cannot connect server "); 
mysql_select_db('Incofarming')or die("cannot select DB");

$besar_query = "SELECT * FROM besaran";
$besar_result = mysql_query($besar_query);

$jenis_query = "SELECT * FROM jenis";
$jenis_result = mysql_query($jenis_query);

?>

<div id="container">
	<div id="header">
		
		<div id="logo">
			<p>&nbsp;</p>
			<p>INCOFARMING </p>
		</div>

    	<div id="tab">
		  <ul class="nav nav-tabs navbar-inverse">
			<li><a href="#">DASHBOARD</a></li>
			<li><a href="#">Manajemen Profil</a></li>
			<li class="active"><a href="#">Manajemen Produk</a></li>
		  </ul>
		</div>
		
    </div>    
		<h2 align="center"> INSERT PRODUK </h2>
		


<form class="form-horizontal" action="../Functions/insertproduk.php" method="POST">  
        <fieldset>  
          <div class="control-group">  
            <label class="control-label" for="input01">Nama Produk</label>  
            <div class="controls">  
              <input type="text" class="input-xlarge" id="input01" name="namaproduk">   
            </div>  
    </div>
		  <div class="control-group">  
		  
		  <fieldset>  
          <div class="control-group">  
            <label class="control-label" for="input01">Jenis Produk</label>  
            <div class="controls">  
               <select id="select01" name="jenis"> 
            <?php
				while($row = mysql_fetch_array($jenis_result)){
			?>
            	<option value="<?php echo $row['IDJENIS']; ?>" onClick=""><?php echo $row['NAMAJENIS']; ?> </option>
            <?php } ?>
              </select>    
            </div>  
          </div>
		  <div class="control-group"> 
		  
            <label class="control-label" for="input01">Kuantitas</label>  
            <div class="controls">  
              <input type="text" class="input-xlarge" id="input01" name="kuantitas">   
            </div>  
          </div>
		  
		  <div class="control-group">  
            <label class="control-label" for="input01">Harga per satuan</label>  
            <div class="controls">  
              <input type="text" class="input-xlarge" id="input01" name="harga">   
            </div>  
          </div>
		  
		  <div class="control-group">  
            <label class="control-label" for="select01">Satuan</label>  
            <div class="controls">  
                  <select id="select01" name="satuan"> 
            <?php
				while($row = mysql_fetch_array($besar_result)){
			?>
            	<option value="<?php echo $row['IDBESARAN']; ?>" onClick=""><?php echo $row['BESARAN']; ?> </option>
            <?php } ?>
              </select>   
            </div>  
          </div>
		  <div class="control-group">  
            <label class="control-label" for="select01">Berlaku sampai</label>  
            <div class="controls">  
             <input type="date" class="input-xlarge" id="input01" name="berlaku">  
            </div>  
          </div>
         
		  <div class="control-group">  
            <label class="control-label" for="fileInput">Foto Produk</label>  
            <div class="controls">  
              <input class="input-file" id="fileInput" type="file" name="fotoproduk">  
            </div>  
          </div>  
          <div class="control-group">  
            <label class="control-label" for="textarea">Deskripsi Produk</label>  
            <div class="controls">  
              <textarea class="input-xlarge" id="textarea" rows="3" name="deskripsi"></textarea>  
            </div>  
          </div>
          <div class="control-group">  
            <label class="control-label" for="select01">Ketersediaan</label>  
          	<div class="controls radio">
				<input type="radio" name="sedia" id="optionsRadios1" value="1" checked>
                Tersedia</input>
            </div>
            <div class="controls radio"> 
            <input type="radio" name="sedia" id="optionsRadios1" value="0" checked>
                Tidak Tersedia</input>
            </div>
          </div>
          <div class="form-actions">  
            <button type="submit" class="btn btn-primary">Simpan</button>  
            <button type="reset" class="btn">Batal</button>  
          </div>  
       </fieldset>  
</form> 

</div>

<script src="js/jquery-latest.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-carousel.js"></script>
<script src="js/jquery.js"></script>
<script src="js/bootstrap-dropdown.js"></script>
<script type="text/javascript" src="js/dropdown.js"></script>

	
</body>

</html>